package go84;

import javax.microedition.location.*;

public class Point{
	private String name;
	private Coordinates coord;


	public Point (Coordinates coord, String name) {
		this.coord = coord;
		this.name = name;
	}
	public Point (double lat,  double lon, String name) {
		this.coord = new Coordinates(lat, lon, Float.NaN);
		this.name = name;
	}
	public Coordinates getCoord() {
		return coord;
	}
	public String getName() {
		return name;
	}
	public void setCoord(Coordinates coord) {
		this.coord = coord;
	}
	public void setLat(double lat) {
		coord.setLatitude(lat);
	}
	public void setLong(double lon) {
		coord.setLongitude(lon);
	}
	public double getLat() {
		return coord.getLatitude();
	}
	public double getLong() {
		return coord.getLongitude();
	}
	public void setName(String name) {
		this.name = name;
	}
	public String toString(int grid) {
		return (name + "\n" + UTM.toString(coord, grid));
	}
}

